import fastify from '@/app'

fastify.get('/', async (request, reply) => {
  reply.send({ hello: 'fastify!!!' })
})

const start = () => {
  fastify.listen({ port: 3000, host: '0.0.0.0' }, (err, address) => {
    if (err) {
      fastify.log.error(err)
      process.exit(1)
    }
    console.info(`server listening on ${address}`)
  })
}

start()
